#include "Python.h"

void __demomodule_MOD_add(int *a,int *b,int *c);

static PyObject *add_c(PyObject *self ,PyObject *args){

    int a,b,c;
    if (!PyArg_ParseTuple(args,"ii",&a,&b)){
        return NULL;

    }
    __demomodule_MOD_add(&a,&b,&c);
    return Py_BuildValue("i",c);
}

static PyMethodDef paliMethods[]={
    {"add",add_c,METH_VARARGS,"add demo"},
    {NULL,NULL,0,NULL}

};
static struct PyModuleDef add={
    PyModuleDef_HEAD_INIT,
    "add",
    "my tools",
    -1,
    paliMethods
};

PyMODINIT_FUNC PyInit_add(void){
    return PyModule_Create(&add);
}



